package com.party.core.model.mall;

import com.party.core.model.BaseModel;

/**
 * Created by huangwuming on 2018/3/26/026.
 */
public class MallBrand extends BaseModel{
    //名称
    private  String name;
    //logo
    private  String logo;
    //商品数量
    private  int goodsNum;
    //排序
    private  int sort;

    public MallBrand(String name) {
        this.name = name;
    }

    public MallBrand() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public int getGoodsNum() {
        return goodsNum;
    }

    public void setGoodsNum(int goodsNum) {
        this.goodsNum = goodsNum;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;

        MallBrand that = (MallBrand) o;

        if (goodsNum != that.goodsNum) return false;
        if (sort != that.sort) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        return logo != null ? logo.equals(that.logo) : that.logo == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (logo != null ? logo.hashCode() : 0);
        result = 31 * result + goodsNum;
        result = 31 * result + sort;
        return result;
    }

    @Override
    public String toString() {
        return "MallGoodsBrand{" +
                "name='" + name + '\'' +
                ", logo='" + logo + '\'' +
                ", goodsNum=" + goodsNum +
                ", sort=" + sort +
                '}';
    }
}
